<html>

	<head>
		<meta charset="utf-8" />
		<!-- google font -->
		<link href='http://fonts.googleapis.com/css?family=Noto+Sans' rel='stylesheet' type='text/css'>
		<!-- css global -->
		<link rel="stylesheet" href="css/main.css?v=<?php echo filemtime('css/main.css');?>" />
		<!-- css checkbox -->
		<link rel="stylesheet" href="jquery/icheck/blue.css?v=<?php echo filemtime('jquery/icheck/blue.css');?>" />
		<!-- titre -->
		<title>PiTiNiNjA.NeT</title>
	</head>

	<body>

		<!-- jquery -->
		<script type="text/javascript" src="jquery/jquery-1.10.2.min.js"></script>

		<!-- icheck -->
		<script type="text/javascript" src="jquery/icheck/jquery.icheck.min.js"></script>

		<?php

		//session start
		session_start();

		//inclusion connexion mysql
		include('sql/connec.php');

		//vérification login et détermination page
		if(isset($_SESSION['login']) && $_SESSION['login'] == 'login')
		{
			//inclusion header
			include('compo/header.php');
			//récupération nom page
			if(isset($_GET['page']) && $_GET['page'] != '') { $page = $_GET['page']; } else { $page = 'accueil'; }
			//inclusion contenu
			echo '<section>';
				include('page/'.$page.'.php');
			echo '</section>';
		}
		else
		{
			//redirection vers assistance
			if(isset($_GET['page']) && $_GET['page'] == 'assistance') { include('page/assistance.php'); }
			//redirection vers inscription
			elseif(isset($_GET['page']) && $_GET['page'] == 'suscribe') { include('page/suscribe.php'); }
			//redirection vers login
			else { include('page/login.php'); }
		}

		//fermeture mysql
		mysql_close(); 

		?>

		<!-- activation icheck -->

		<script>
			$(document).ready(function(){
				$('input').iCheck({
					checkboxClass: 'icheckbox_square-blue',
					radioClass: 'iradio_square-blue'
				});
			});
		</script>

	</body>

</html>